//
//  YGFormItemTableViewCell.m
//  yuanshangyiliao
//
//  Created by icholab on 2021/4/27.
//

#import "YGFormItemTableViewCell.h"
@interface YGFormItemTableViewCell()
@property (nonatomic, strong) UILabel  *contentLabel;
@property (nonatomic, strong) NSArray  *array;

@end
@implementation YGFormItemTableViewCell

- (void)layoutSubviews{
    CGFloat width = 0;
    NSInteger row = 0;
    if (self.tag == 0) {
        row = self.confi.headerConfigure.row;
       width = self.width/row;
    }else{
        row = self.confi.row;
        width = self.width/row;
    }
    for (int i = 0; i < row; i++) {
        UILabel *label =  [self viewWithTag:labelTag + i];
        label.frame = CGRectMake(width * i, 0, width, self.confi.cellHieght);
    }
}

- (void)setConfigure:(YGFromTableConfigure *)model{
    self.confi = model;
    if (model) {
        for (int i = 0; i < model.row; i ++) {
            UILabel *label = [[UILabel alloc] init];
            label.tag = labelTag + i;
            label.font = [UIFont systemFontOfSize:13];
            label.textAlignment = NSTextAlignmentCenter;
            label.textColor = UIColorFromRGB(0x333333);
            label.layer.borderColor = UIColorFromRGB(0x37C8D7).CGColor;
            label.layer.borderWidth = 0.5;
            [self addSubview:label];
        }
    }
}

- (void)setData:(id)data{
    
}
@end
